<template>
    <el-card>
        <template #header>
            <div class="card-header">
                <span>基础用法</span>
            </div>
        </template>
        <el-row class="margin-bottom-sm">
            <el-button>Default</el-button>
            <el-button type="primary">Primary</el-button>
            <el-button type="success">Success</el-button>
            <el-button type="info">Info</el-button>
            <el-button type="warning">Warning</el-button>
            <el-button type="danger">Danger</el-button>
        </el-row>
        <el-row class="margin-bottom-sm">
            <el-button plain>Plain</el-button>
            <el-button type="primary" plain>Primary</el-button>
            <el-button type="success" plain>Success</el-button>
            <el-button type="info" plain>Info</el-button>
            <el-button type="warning" plain>Warning</el-button>
            <el-button type="danger" plain>Danger</el-button>
        </el-row>
        <el-row class="margin-bottom-sm">
            <el-button round>Round</el-button>
            <el-button type="primary" round>Primary</el-button>
            <el-button type="success" round>Success</el-button>
            <el-button type="info" round>Info</el-button>
            <el-button type="warning" round>Warning</el-button>
            <el-button type="danger" round>Danger</el-button>
        </el-row>
        <el-row>
            <el-button :icon="Search" circle />
            <el-button type="primary" :icon="Edit" circle />
            <el-button type="success" :icon="Check" circle />
            <el-button type="info" :icon="Message" circle />
            <el-button type="warning" :icon="Star" circle />
            <el-button type="danger" :icon="Delete" circle />
        </el-row>
    </el-card>
    <el-card class="margin-top">
        <template #header>
            <div class="card-header">
                <span>禁用状态</span>
            </div>
        </template>
        <el-row class="margin-bottom-sm">
            <el-button disabled>Default</el-button>
            <el-button type="primary" disabled>Primary</el-button>
            <el-button type="success" disabled>Success</el-button>
            <el-button type="info" disabled>Info</el-button>
            <el-button type="warning" disabled>Warning</el-button>
            <el-button type="danger" disabled>Danger</el-button>
        </el-row>
        <el-row>
            <el-button plain disabled>Plain</el-button>
            <el-button type="primary" plain disabled>Primary</el-button>
            <el-button type="success" plain disabled>Success</el-button>
            <el-button type="info" plain disabled>Info</el-button>
            <el-button type="warning" plain disabled>Warning</el-button>
            <el-button type="danger" plain disabled>Danger</el-button>
        </el-row>
    </el-card>
    <el-card class="margin-top">
        <template #header>
            <div class="card-header">
                <span>链接按钮</span>
            </div>
        </template>
        <p>Basic link button</p>
        <div class="flex justify-space-between margin-top-sm margin-bottom-sm flex-wrap gap-4">
            <el-button v-for="button in buttons" :key="button.text" :type="button.type" link>{{ button.text }}
            </el-button>
        </div>
        <p>Disabled link button</p>
        <div class="flex justify-space-between margin-top-sm flex-wrap gap-4">
            <el-button v-for="button in buttons" :key="button.text" :type="button.type" link disabled>{{ button.text }}
            </el-button>
        </div>
    </el-card>

    <el-card class="margin-top">
        <template #header>
            <div class="card-header">
                <span>文字按钮</span>
            </div>
        </template>
        <p>Basic text button</p>
        <div class="flex justify-space-between margin-top-sm margin-bottom-sm flex-wrap gap-4">
            <el-button v-for="button in buttons" :key="button.text" :type="button.type" text>{{ button.text }}
            </el-button>
        </div>

        <p>Background color always on</p>
        <div class="flex justify-space-between margin-top-sm margin-bottom-sm flex-wrap gap-4">
            <el-button v-for="button in buttons" :key="button.text" :type="button.type" text bg>{{ button.text }}
            </el-button>
        </div>

        <p>Disabled text button</p>
        <div class="flex justify-space-between flex-wrap gap-4">
            <el-button v-for="button in buttons" :key="button.text" :type="button.type" text disabled>{{ button.text }}
            </el-button>
        </div>
    </el-card>
</template>

<script lang="ts" setup>
  import { reactive, toRefs, onMounted,ref } from 'vue'
    import {
        Check,
        Delete,
        Edit,
        Message,
        Search,
        Star,
    } from '@element-plus/icons-vue'
    const buttons = [
        { type: '', text: 'plain' },
        { type: 'primary', text: 'primary' },
        { type: 'success', text: 'success' },
        { type: 'info', text: 'info' },
        { type: 'warning', text: 'warning' },
        { type: 'danger', text: 'danger' },
    ];
    const region=ref('');
</script>
<style scoped lang="scss">
</style>